package com.yylending.las.personal.bandcard;

import android.os.Parcel;
import android.os.Parcelable;
import com.yylending.las.common.widgets.pickerview.model.IPickerViewData;

/**
 * Created by HenryZhang on 2016/11/15.
 * Copyright © 2016 www.yyfax.com. All Rights Reserved.
 */
public class Bank implements Parcelable, IPickerViewData {
	/**银行编号*/
	public String value = "";
	/**银行名称*/
	public String label = "";
	/**排序号*/
	public int sort = 0;

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	public int getSort() {
		return sort;
	}

	public void setSort(int sort) {
		this.sort = sort;
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel parcel, int i) {
		parcel.writeString(value);
		parcel.writeString(label);
		parcel.writeInt(sort);
	}

	public final static Creator<Bank> CREATOR = new Creator<Bank>() {
		@Override
		public Bank createFromParcel(Parcel source) {
			return new Bank(source);
		}

		@Override
		public Bank[] newArray(int size) {
			return new Bank[size];
		}
	};

	private Bank(Parcel src) {
		value = src.readString();
		label = src.readString();
		sort = src.readInt();
	}

	public Bank() {}

	@Override
	public String getPickerViewText() {
		return label;
	}
}
